package com.xiaxiang.xiawan.Home;

import android.util.Log;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2017-10-27.
 */

public class HomeData {
    public static String ID_KEY = "id";
    public static String DELETESTATUS_KEY = "deleteStatus";
    public static String NAME_KEY = "name";
    public static String TYPE_KEY = "type";
    public static String URL_KEY = "url";
    public static String USERID_KEY = "userId";
    public static String USER_NAME_KEY = "userName";
    public static String THUMBNAIL_KEY = "thumbnail";
    public static String MATERIA_URL_KEY = "materialUrl";
    public static String MATERIAL_ID_KEY = "materialId";
    public static String ADD_TIME_KEY = "addTime";
    public static String TAILS_KEY = "tails";
    public static String MD5_KEY = "md5";
    public static String SHARE_URL_KEY = "shareUrl";
    public static String HEAD_PHOTO = "headPhoto";
    public boolean mIsSelect = false;
    public int mId = 0;
    public int mDeleteStatus = 0;
    public String mAddTime = "";
    public String mName = "";
    public String mType = "";
    public String mVideoUrl = "";
    public String mUserId = "";
    public String mUserName = "";
    public String mThumbnailUrl = "";
    public String mMaterialId = "";
    public String mMterialUrl = "";
    public String mTails = "";
    public String mHeadPhoto = "";
    public String mMd5 = "";
    public String mShareUrl = "";
    public void setJSONData(JSONObject object){
        try {
            mId = object.getInt(ID_KEY);
            mDeleteStatus = object.getInt(DELETESTATUS_KEY);
            mAddTime = object.getString(ADD_TIME_KEY);
            mName = object.getString(NAME_KEY);
            mType = object.getString(TYPE_KEY);
            mVideoUrl = object.getString(URL_KEY);
       //     mUserId = object.getString(USERID_KEY);
            mUserName = object.getString(USER_NAME_KEY);
            mThumbnailUrl = object.getString(THUMBNAIL_KEY);
            mTails = object.getString(TAILS_KEY);
            mShareUrl = object.getString(SHARE_URL_KEY);
            mMterialUrl = object.getString(MATERIA_URL_KEY);
            mMd5 = object.getString(MD5_KEY);
            mMaterialId = object.getString(MATERIAL_ID_KEY);
            mHeadPhoto = object.getString(HEAD_PHOTO);
        } catch (JSONException e) {
            e.printStackTrace();
        }
    }


}
